[PATCH 6 of 9] MD: no sync IO while suspended

Patch name: md-no-sync-IO-while-suspended.patch

Disallow resync I/O while the RAID array is suspended.

Recovery, resync, and metadata I/O should not be allowed while a device is
suspended.

Signed-off-by: Jonathan Brassow <jbrassow [at] redhat.com>

Index: linux-2.6/drivers/md/md.c
============================================================ =======
--- linux-2.6.orig/drivers/md/md.c
+++ linux-2.6/drivers/md/md.c
[at] [at] -7064,7 +7064,6 [at] [at] void md_do_sync(mddev_t *mddev)
}
EXPORT_SYMBOL_GPL(md_do_sync);

-
static int remove_and_add_spares(mddev_t *mddev)
{
mdk_rdev_t *rdev;
[at] [at] -7176,6 +7175,9 [at] [at] static void reap_sync_thread(mddev_t *md
*/
void md_check_recovery(mddev_t *mddev)
{
+ if (mddev->suspended)
+ return;
+
if (mddev->bitmap)
bitmap_daemon_work(mddev);

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Brassow [ Di, 24 Mai 2011 05:06 ] [ ID #2059956 ]

Re: [PATCH 6 of 9] MD: no sync IO while suspended

On Mon, 23 May 2011 22:06:53 -0500 Jonathan Brassow <jbrassow [at] f14.redhat.com>
wrote:

> Patch name: md-no-sync-IO-while-suspended.patch
>
> Disallow resync I/O while the RAID array is suspended.
>
> Recovery, resync, and metadata I/O should not be allowed while a device is
> suspended.
>
> Signed-off-by: Jonathan Brassow <jbrassow [at] redhat.com>
>
> Index: linux-2.6/drivers/md/md.c
> ============================================================ =======
> --- linux-2.6.orig/drivers/md/md.c
> +++ linux-2.6/drivers/md/md.c
> [at] [at] -7064,7 +7064,6 [at] [at] void md_do_sync(mddev_t *mddev)
> }
> EXPORT_SYMBOL_GPL(md_do_sync);
>
> -
> static int remove_and_add_spares(mddev_t *mddev)
> {
> mdk_rdev_t *rdev;
> [at] [at] -7176,6 +7175,9 [at] [at] static void reap_sync_thread(mddev_t *md
> */
> void md_check_recovery(mddev_t *mddev)
> {
> + if (mddev->suspended)
> + return;
> +
> if (mddev->bitmap)
> bitmap_daemon_work(mddev);
>

Yep, applied.

Thanks,
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
NeilBrown [ Mi, 25 Mai 2011 06:10 ] [ ID #2060016 ]
Linux » gmane.linux.raid » [PATCH 6 of 9] MD: no sync IO while suspended

Vorheriges Thema: [PATCH 7 of 9] MD: new sb type
Nächstes Thema: [PATCH 1 of 9] MD: possible typo